package org.example;

public class string {
    public static void main(String[] args){
        StringBuilder sb = new StringBuilder();
        sb.append(12);
        sb.append("黑马");
        sb.append(true);

        //append支持临时编程
        sb.append(666).append("黑马2").append(666);
        System.out.println(sb);

        //反转操作
        sb.reverse();
        System.out.println(sb);

        System.out.println(sb.length());

        //转换字符串
        String s = sb.toString();
        System.out.println(s);
    }
}
